<?php
/**
 * common repository file Created by PhpStorm.
 * User: yang
 * Date: 2020/06/06
 */

namespace Common\Repository;

use Common\Model\WebNews;

class WebNewsRepository extends BaseRepository
{
    public function baseModel()
    {
        return new WebNews();
    }

    /**
     * 获取列表
     * @param array $arr_option
     * @return mixed
     */
    public function extendGetList($arr_option = [])
    {
        $model = self::model_child();
        if (!empty($arr_option['where']['title'])) {
            $model = $model->where('title', 'like', '%' . $arr_option['where']['title'] . '%');
            unset($arr_option['where']['title']);
        }

        return $model->CommonGetList($arr_option);
    }
}